const Koa = require('koa');

const router = require('koa-router')();

const app = new Koa();

router.get('/', async (ctx) => {
  ctx.body = '首页';
});

app.use(router.routes());
app.use(router.allowedMethods());
app.listen(9000, () => {
  console.log('koa server is running in http://localhost:9000');
});
